#include "treenode.h"

TreeNode::TreeNode()
{

}

TreeNodePtr TreeNode::parent() const
{
    return mParent;
}

void TreeNode::setParent(const TreeNodePtr p)
{
    this->mParent = p;
}

void TreeNode::appendNode(TreeNodePtr node)
{
    childs.append(node);
}

void TreeNode::removeNode(int row)
{
    childs.removeAt(row);
}

QVariant TreeNode::data(int role)
{
    return mRecord[role];
}

void TreeNode::setData(int role, QVariant value)
{
    mRecord[role] = value;
}
